package com.alex.jbpm.apply.task;

import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.taskmgmt.def.AssignmentHandler;
import org.jbpm.taskmgmt.exe.Assignable;

public class ProvinceProcessTask implements AssignmentHandler {

	private static final long serialVersionUID = -1275715150627523612L;

	public void assign(Assignable assign, ExecutionContext context) throws Exception {
		ContextInstance contextInstance = context.getContextInstance();
		//获取申请单对应的行政区划信息，并根据行政区划设置操作用户或用户组
		String documentId = contextInstance.getVariable("documentId").toString();
		contextInstance.setVariable("userInfo","sheng_1");
		assign.setActorId("sheng_1");
		System.out.println("进行公文：".concat(documentId).concat(" 【省级】任务分配..."));
	}

}
